home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Misc / DLL / MakeDLL < prev    next >
Text File  |  1995-07-08  |  3KB  |  136 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Screen    \
  4.             o.SWI    \
  5.             o.Validation    \
  6.             o.Dispatch    \
  7.  
  8.  
  9. LibName        =    Misc
  10.  
  11.  
  12.  
  13. # Template makefile to make Straylight Dynamic Link 
  14. # Library from a DeskLib sublibrary's .o files
  15. #
  16. # The DLL is made in the directory 
  17. # '<DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.'
  18. # and has the same name as the DeskLib sublibrary.
  19. #
  20. # Julian Smith 17 Apr 1995.
  21.  
  22. # The macro $(ObjectFiles) should be set at the 
  23. # start of this file, to be a space-separated
  24. # list of object files.
  25. # This is done by 'Makatic'.
  26.  
  27. # The macro $(LibName) should also be set at the 
  28. # start of this file, to be the name of the 
  29. # DeskLib sublibrary.
  30. # This is done by 'Makatic'.
  31.  
  32. # Note that this makefile doesn't use cc at all
  33. # - it merely links existing .o files.
  34.  
  35. # Linker flags, These can be anything. 
  36. # All flags required by Straylight (eg Link -rmf) 
  37. # are included in the $(LINK) macro.
  38. #
  39. LinkFlags    =    $(LinkExtra)
  40.  
  41.  
  42. # Macros for commands, including the Straylight
  43. # tool 'cdll'. Note that DRLink doesn't seem to
  44. # work with the SDLS.
  45. #
  46. LINK        =    Link -rmf
  47. CDLL        =    cdll
  48.  
  49.  
  50. # Filename of the thing we need to make: - the main
  51. # dynamically-linked library, which will go in the 
  52. # !DLL application.
  53. # NB The leafname of $(DLL_Lib) file (after copying into the !DLL
  54. # application) should be the same as the 'name' field in the
  55. # $(DLL_Def) file. In this case, this is $(LibName).
  56. DLL_Lib        =    <DeskLib$Dir>.!DLLs.Freeware_1.DeskLib.$(LibName)
  57.  
  58.  
  59. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  60. #
  61. DLL_Header    =    Header
  62. DLL_Def        =    ^.DLLDef
  63. DLL_Stubs    =    Stubs
  64.  
  65.  
  66.  
  67. # -------------------------------------------------------
  68. # Everything below here should probably not be changed...
  69. # -------------------------------------------------------
  70.  
  71.  
  72. # Extra libs, written by Straylight, which always need to be linked into a DLL
  73. #
  74. SDLS_ExtraObjects=                    \
  75.             C:DLLLib.o.DLLLib        \
  76.             C:DLLLib.o.dstubs        \
  77.  
  78.  
  79. # Extra DeskLib libraries which need to be linked into the final DLL.
  80. # The DLL DeskLib library is included here because some DeskLib DLLs may
  81. # refer to other DeskLib DLLs.
  82. # Note that DeskLib:o.DLL contains all the DLL.o.* files except for 
  83. # the sublibraries for which there is a DLL - just the DLL Stubs file
  84. # is included for these.
  85. #
  86. DeskLib_ExtraObjects=                \
  87.             DeskLib:o.DLLDLL    \
  88.  
  89.  
  90.  
  91.  
  92. #Here's what we want to make...
  93.  
  94. All:    $(DLL_Lib)
  95.  
  96. $(DLL_Lib):    $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header) $(ObjectFiles)
  97.     $(LINK) $(LinkFlags) -o $@ $(ObjectFiles) $(DeskLib_ExtraObjects) $(SDLS_ExtraObjects) $(DLL_Header)
  98.  
  99.  
  100.  
  101. # Here's how to make the things which are needed in the above rules
  102.  
  103. $(DLL_Def):    
  104.     | Error: No DLL definition file exists.
  105.     |        You should run th MkStubsOs makefile
  106.     |        and then alter the template Def
  107.     |        file by hand.
  108.  
  109. $(DLL_Header):    $(DLL_Def)
  110.     $(CDLL) -def $(DLL_Def) -hdr $(DLL_Header)
  111.  
  112.  
  113. # Rule for compiling C source code for a Straylight dynamically-linked library.
  114. # Actually, we don't call cc - we complain and tell the user to run the 
  115. # MkStubsOs makefile.
  116.  
  117. VPATH = @.^
  118.  
  119. .SUFFIXES:    .o .c .s
  120. .c.o:
  121.     | $@ needs recompiling. This should be done by
  122.     | running the MkStubsOs or MkOs makefile before running
  123.     | this makefile.
  124.     |
  125.  
  126. .s.o:
  127.     | $@ needs assembling. This should be done by
  128.     | running the MkStubsOs or MkOs makefile before running
  129.     | this makefile.
  130.     |
  131.  
  132.  
  133.  
  134. # Dynamic dependencies:
  135.